// 环境配置
export const config = {
  // 服务器配置
  server: {
    port: 3232,
    hostname: 'localhost'
  },
  
  // JWT 配置
  jwt: {
    secret: process.env.JWT_SECRET || 'your-secret-key-change-in-production',
    expiresIn: '24h'
  },
  
  // 微信配置
  wechat: {
    appId: process.env.WECHAT_APP_ID || 'your-wechat-app-id',
    appSecret: process.env.WECHAT_APP_SECRET || 'your-wechat-app-secret',
    redirectUri: process.env.WECHAT_REDIRECT_URI || 'http://localhost:3232/api/auth/wechat/callback'
  },
  
  // CORS 配置
  cors: {
    origin: process.env.CORS_ORIGIN || true,
    methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'PATCH'],
    allowedHeaders: [
      'Content-Type',
      'Authorization',
      'X-Requested-With',
      'Accept',
      'Origin',
      'Access-Control-Request-Method',
      'Access-Control-Request-Headers'
    ],
    credentials: true,
    maxAge: 86400
  }
}

export default config
